{:W('Template/top')}
<div class="wrapper clearfix content" style="position: relative;border: 1px solid #ddd">
    {:W('Template/left')}
    <div class="rightbox pull-right">
        <div class="ur-here">您当前的位置：<a href="#">代理商管理</a>&gt; <a href="{:U('Agency/index',array('id' => 6))}">代理商列表</a>
            &gt;交易记录
        </div>
        <div class="cTitle2">{$name} 的交易记录</div>
        <div class="main-search">
            <div class="top">
                <form method="get"
                      action="{:U('Agency/showTransaction',array('id' => I('get.id'),'aid' => I('get.aid'), 'oid' => I('get.oid')))}"
                      class="form-inline">
                    <div class="form-group">
                        <input type="text" name="entity_name" class="form-control" placeholder="请输入用途" value="{$sname}">
                    </div>
                    <div class="form-group ml">
                        <label>时间：</label>
                        <input type="text" class="form-control ui-datepicker Wdate" name="start_time" placeholder="开始日期"
                               value="{$startTime}" id="d4322" onclick="WdatePicker({el: $dp.$('d12')})"
                               style="width:80%">
                    </div>
                    <span class="end">到</span>

                    <div class="form-group">
                        <label class="sr-only"></label>
                        <input type="text" class="form-control ui-datepicker Wdate" name="end_time" placeholder="结束日期"
                               value="{$endTime}" id="d4322" onclick="WdatePicker({el: $dp.$('d12')})">
                    </div>
                    <button type="submit" class="btn btn-warning">查询</button>
                    <span style="font-size: 16px;margin-left: 20px;">共 <span
                            style="color:#33b3b8">{$total.0.totalnum}</span> 条
                    共<span style="color:#f08519"> {$total.0.totalprice|getYuan}</span> 元</span>
                </form>
            </div>

            <span style="font-size: 15px;">
                充值总额 : <span style="color: #f08519">{$topUpTotal.0.topuptotal|getYuan}</span> 元
                &nbsp;&nbsp;
                发票总额 : <span style="color: #f08519">{$invoiceTotal.0.invoicetotal|abs|getYuan}</span> 元
                &nbsp;&nbsp;
                剩余开票额度 : <span style="color: #f08519">{$lastTotal|getYuan}</span> 元
            </span>

            <p></p>

            <form method="post"
                  action="{:U('GetApplyExcel/getAgencyTransactionExcel',array('id' => I('get.id'),'aid' => I('get.aid')))}">
                <input type="hidden" name="sname" value="{$sname}">
                <input type="hidden" name="start_time" value="{$startTime}">
                <input type="hidden" name="end_time" value="{$endTime}">
                <input type="submit" class="btn btn-success" value="导出生成Excel">
            </form>
        </div>

        <table class="cTable table-hover" width="100%">
            <tr>
                <th width="5%">编号</th>
                <th width="5%">订单号</th>
                <th width="10%">交易号</th>
                <th width="10%">明细</th>
                <th width="10%">用途</th>
                <th width="5%">金额</th>
                <th width="5%">余额</th>
                <th width="10%">备注</th>
                <th width="10%">操作时间</th>
            </tr>
            <foreach name="info" item="vo">
                <tr>
                    <td>{$vo.id}</td>
                    <td>{$vo.object_id}</td>
                    <td>{$vo.sn}</td>
                    <td>{$vo.objectName.tour_name}</td>
                    <td class="text-c5">{$vo.action}</td>
                    <td class="text-c1">{$vo.amount|getYuan}</td>
                    <td class="text-c5">{$vo.balance|getYuan}</td>
                    <td class="text-c5">
                        <if condition="$vo['memo'] != ''">
                            {$vo.memo}
                            <else/>
                            无
                        </if>
                    </td>
                    <td>{$vo.create_time}</td>
                </tr>
            </foreach>
        </table>
        <notempty name="info">
            <div class="pagebox">
                {$page}
            </div>
        </notempty>
    </div>
</div>

{:W('Template/bottom')}
</body>
</html>
